//SpriteFX.h
//Created 24/01/14
//Created By Daniel Bowler
//
//Effect used to draw a 2D image to the screen (eg sprite or character from a font sheet)

#pragma once

#include "AbstractFX.h"

class SpriteFX : public AbstractFX
{
	//The shader Manager will be responsable for creating the shaders. 
	friend ShaderManager;

public:
	//Vertex structure for this effect.
	struct PerVertex
	{
		XMFLOAT3 Pos;
		XMFLOAT2 Tex;
		XMCOLOR Colour;
	};

	//Set shader resource (texture)
	void SetTexture(ID3D11ShaderResourceView* tex);

private:
	//We dont want the user to directly create one of these (They work with
	//pointers), so hide the constructor/destructors. 
	SpriteFX(ID3D11Device* device);
	~SpriteFX();
	//Disable the copy constructor and the = operator
	SpriteFX(const SpriteFX& other);
	SpriteFX& operator = (const SpriteFX& other);

	//Override these to aid creating our shader.
	void InitInputLayout(ID3D11Device* device);
	void InitShaderVariablePointers();

private:
	//Shader variables - Texture only. 
	ID3DX11EffectShaderResourceVariable* texture;
};